/**
 * 
 */
package travibot.meta;

import travibot.model.Cost;


/**
 * @author tajzivit
 *
 */
public class UnitType {

    private int id;
    private String name;
    private int attack;
    private int defence;
    private int cavalryDefence;
    private int speed;
    private int carryingCapacity;
    private String implementingClassName;
    private Cost cost = new Cost();
    
    /*
     * (non-Javadoc)
     * 
     * @see java.lang.Object#equals(java.lang.Object)
     */
    @Override
    public boolean equals(Object obj) {

        boolean ret = false;
        if (obj instanceof UnitType) {
            if (id == ((UnitType)obj).id) {
                ret = true;
            }
        }
        return ret;
    }
    
    /*
     * (non-Javadoc)
     * 
     * @see java.lang.Object#hashCode()
     */
    @Override
    public int hashCode() {

        return String.valueOf(id).hashCode();
    }

    
    public int getId() {
    
        return id;
    }

    
    public void setId(int id) {
    
        this.id = id;
    }

    
    public String getImplementingClassName() {
    
        return implementingClassName;
    }

    
    public void setImplementingClassName(String implementingClassName) {
    
        this.implementingClassName = implementingClassName;
    }

    
    public String getName() {
    
        return name;
    }

    
    public void setName(String name) {
    
        this.name = name;
    }

    
    public int getAttack() {
    
        return attack;
    }

    
    public void setAttack(int attack) {
    
        this.attack = attack;
    }

    
    public int getDefence() {
    
        return defence;
    }

    
    public void setDefence(int defence) {
    
        this.defence = defence;
    }

    
    public int getCavalryDefence() {
    
        return cavalryDefence;
    }

    
    public void setCavalryDefence(int cavalryDefence) {
    
        this.cavalryDefence = cavalryDefence;
    }

    
    public int getSpeed() {
    
        return speed;
    }

    
    public void setSpeed(int speed) {
    
        this.speed = speed;
    }

    
    public int getCarryingCapacity() {
    
        return carryingCapacity;
    }

    
    public void setCarryingCapacity(int carryingCapacity) {
    
        this.carryingCapacity = carryingCapacity;
    }
    
    public Cost getCost(){
        
        return this.cost;
    }
}
